package reno.activity.eo;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "activitydetail", schema = "activity", catalog = "")
public class ActivitydetailEntity {
    private long activityid;
    private long rewardid;
    private String rewardname;
    private int rewardcount;

    @Basic
    @Column(name = "activityid")
    public long getActivityid() {
        return activityid;
    }

    public void setActivityid(long activityid) {
        this.activityid = activityid;
    }

    @Id
    @Column(name = "rewardid")
    public long getRewardid() {
        return rewardid;
    }

    public void setRewardid(long rewardid) {
        this.rewardid = rewardid;
    }

    @Basic
    @Column(name = "rewardname")
    public String getRewardname() {
        return rewardname;
    }

    public void setRewardname(String rewardname) {
        this.rewardname = rewardname;
    }

    @Basic
    @Column(name = "rewardcount")
    public int getRewardcount() {
        return rewardcount;
    }

    public void setRewardcount(int rewardcount) {
        this.rewardcount = rewardcount;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        ActivitydetailEntity that = (ActivitydetailEntity) o;
        return activityid == that.activityid &&
                rewardid == that.rewardid &&
                rewardcount == that.rewardcount &&
                Objects.equals(rewardname, that.rewardname);
    }

    @Override
    public int hashCode() {
        return Objects.hash(activityid, rewardid, rewardname, rewardcount);
    }
}
